home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2002-03-18 | 1.4 KB | 30 lines |
- <%@ Page Language="vb" AutoEventWireup="false" Codebehind="OutputCachingForm.aspx.vb" Inherits="AspnetApplications.OutputCachingForm" %>
- <%@ OutputCache Duration="10" VaryByParam="txtValue" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <title>OutputCachingForm</title>
- <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
- <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
- <meta name="vs_defaultClientScript" content="JavaScript">
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
- </HEAD>
- <body>
- <form id="Form1" method="post" runat="server">
- <H1>@OutputCache directive demo</H1>
- <P>This pages demonstates how the @OutputCache directive works. The page is cached
- for 10 seconds -or- until you type a different value in the txtValue textbox
- below. Just click repeatedly on the Refresh button, until you see that a new
- time value appears.Comments in the source code show how you can control the
- output cache feauture through code instead of using a directive.</P>
- <P> </P>
- <P>
- <asp:Label id="lblTime" runat="server"></asp:Label></P>
- <P>
- <asp:Button id="btnRefresh" runat="server" Text="Refresh"></asp:Button></P>
- <P>Type a different string to cache a new page
- <asp:TextBox id="txtValue" runat="server"></asp:TextBox></P>
- </form>
- </body>
- </HTML>
-